// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.randomizedWorld.randomizedZoneStory;

import java.util.ArrayList;
import zombie.core.Rand;
import zombie.inventory.InventoryItemFactory;
import zombie.inventory.types.InventoryContainer;
import zombie.iso.IsoMetaGrid;

public class RZSForestCamp extends RandomizedZoneStoryBase {
    public RZSForestCamp() {
        this.name = "Basic Forest Camp";
        this.chance = 10;
        this.minZoneHeight = 6;
        this.minZoneWidth = 6;
        this.zoneType.add(RandomizedZoneStoryBase.ZoneType.Forest.toString());
    }

    public static ArrayList<String> getForestClutter() {
        ArrayList arrayList = new ArrayList();
        arrayList.add("Base.Crisps");
        arrayList.add("Base.Crisps2");
        arrayList.add("Base.Crisps3");
        arrayList.add("Base.Crisps4");
        arrayList.add("Base.Pop");
        arrayList.add("Base.Pop2");
        arrayList.add("Base.WaterBottleFull");
        arrayList.add("Base.CannedSardines");
        arrayList.add("Base.CannedChili");
        arrayList.add("Base.CannedBolognese");
        arrayList.add("Base.CannedCornedBeef");
        arrayList.add("Base.TinnedSoup");
        arrayList.add("Base.TinnedBeans");
        arrayList.add("Base.TunaTin");
        arrayList.add("Base.WhiskeyFull");
        arrayList.add("Base.BeerBottle");
        arrayList.add("Base.BeerCan");
        arrayList.add("Base.BeerCan");
        return arrayList;
    }

    public static ArrayList<String> getCoolerClutter() {
        ArrayList arrayList = new ArrayList();
        arrayList.add("Base.Pop");
        arrayList.add("Base.Pop2");
        arrayList.add("Base.BeefJerky");
        arrayList.add("Base.Ham");
        arrayList.add("Base.WaterBottleFull");
        arrayList.add("Base.BeerCan");
        arrayList.add("Base.BeerCan");
        arrayList.add("Base.BeerCan");
        arrayList.add("Base.BeerCan");
        return arrayList;
    }

    public static ArrayList<String> getFireClutter() {
        ArrayList arrayList = new ArrayList();
        arrayList.add("Base.WaterPotRice");
        arrayList.add("Base.WaterPot");
        arrayList.add("Base.Pot");
        arrayList.add("Base.WaterSaucepanRice");
        arrayList.add("Base.WaterSaucepanPasta");
        arrayList.add("Base.PotOfStew");
        return arrayList;
    }

    @Override
    public void randomizeZoneStory(IsoMetaGrid.Zone zone) {
        int int0 = zone.pickedXForZoneStory;
        int int1 = zone.pickedYForZoneStory;
        ArrayList arrayList0 = getForestClutter();
        ArrayList arrayList1 = getCoolerClutter();
        ArrayList arrayList2 = getFireClutter();
        this.cleanAreaForStory(this, zone);
        this.addTileObject(int0, int1, zone.z, "camping_01_6");
        this.addItemOnGround(this.getSq(int0, int1, zone.z), (String)arrayList2.get(Rand.Next(arrayList2.size())));
        int int2 = Rand.Next(-1, 2);
        int int3 = Rand.Next(-1, 2);
        this.addTentWestEast(int0 + int2 - 2, int1 + int3, zone.z);
        if (Rand.Next(100) < 70) {
            this.addTentNorthSouth(int0 + int2, int1 + int3 - 2, zone.z);
        }

        if (Rand.Next(100) < 30) {
            this.addTentNorthSouth(int0 + int2 + 1, int1 + int3 - 2, zone.z);
        }

        this.addTileObject(int0 + 2, int1, zone.z, "furniture_seating_outdoor_01_19");
        InventoryContainer inventoryContainer = (InventoryContainer)InventoryItemFactory.CreateItem("Base.Cooler");
        int int4 = Rand.Next(2, 5);

        for (int int5 = 0; int5 < int4; int5++) {
            inventoryContainer.getItemContainer().AddItem((String)arrayList1.get(Rand.Next(arrayList1.size())));
        }

        this.addItemOnGround(this.getRandomFreeSquare(this, zone), inventoryContainer);
        int4 = Rand.Next(3, 7);

        for (int int6 = 0; int6 < int4; int6++) {
            this.addItemOnGround(this.getRandomFreeSquare(this, zone), (String)arrayList0.get(Rand.Next(arrayList0.size())));
        }

        this.addZombiesOnSquare(Rand.Next(1, 3), "Camper", null, this.getRandomFreeSquare(this, zone));
    }
}
